package com.lz.LanguageTest;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Locale;

/**
 * spring的国际化支持
 */
@SpringBootApplication
public class LanguageApp {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(LanguageApp.class, args);
        System.out.println(context.getMessage("hi", null, Locale.CHINA));
        System.out.println(context.getMessage("hi", null, Locale.ENGLISH));
        System.out.println(context.getMessage("hi", null, Locale.JAPAN));
    }
}
